import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import  axios from 'axios'
import './plugins/vant.js'
import 'reset-css'
import 'vant/lib/index.css'
Vue.config.productionTip = false

// 配置请求的根路径
axios.defaults.baseURL = '/api'
Vue.prototype.$http = axios

// 价格过滤器
Vue.filter('filterMoney',function (val) {

  return '￥ '+val.toFixed(2)+' 元'
})
router.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
